#include <stdio.h>
int Fibonacci(int num){
	int num1 = 1;
	int num2 = 1;
	int ans = 1;
	while(num > 2){
		ans = num1 + num2;
		num2 = num1;
		num1 = ans;
		num--;
	}
	return ans;
}
int main(){
	int num = 0;
	scanf("%d",&num);
	printf("%d",Fibonacci(num));
	return 0; 
}

